package com.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.data.request.ReqProfessionList;
import com.example.entity.Profession;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Author:yanghua
 * Date:2023/10/7 18:04
 */
@Mapper
public interface ProfessionDao extends BaseMapper<Profession> {
    @Select("select * from profession where del = 0")
    List<Profession> getAllProfessions();

    @Update("update profession set del = 1 where id = #{id}")
    Integer deleteOneProfession(Long id);

    List<Profession> getProfessionList(ReqProfessionList reqProfessionList);

    Integer getProfessionNum(ReqProfessionList reqProfessionList);
}
